package com.toobigtofail
{
	import flash.utils.getDefinitionByName;
	
	import net.flashpunk.Entity;
	import net.flashpunk.FP;
	import net.flashpunk.Graphic;
	import net.flashpunk.Mask;
	import net.flashpunk.World;
	
	public class SceneManager extends Entity
	{
		public function SceneManager()
		{
			this.x = 0;
			this.y = 0;
			this.width = FP.width;
			this.height = FP.height;
			
			super(x, y, graphic, mask);
		}
		
		override public function added():void
		{
			super.added();
		}
		
		override public function update():void
		{
			super.update();
		}
		
		public function addScene(newScene:Scene, content:*=null):void
		{
			(FP.world as World).add(newScene);
		}
		private function calculateFreeSpace():void
		{
			
		}
		public function clearScenes():void
		{
			var wipeArray:Array = new Array;
			FP.world.getClass(Scene, wipeArray);
			FP.world.removeList(wipeArray);
			
		}
	}
}